home *** CD-ROM | disk | FTP | other *** search
- Turbo Vision help file compiler (TVHC.EXE).
- ===========================================
-
- Refer to OOPHELP.TXT for an example of a help source file.
-
- This program takes a help script and produces a help file (.HLP)
- and a help context file (.PAS). The format for the help file is
- very simple. Each context is given a symbolic name (i.e FileOpen)
- which is then put in the context file (i.e. hcFileOpen). The text
- following the topic line is put into the help file. Since the
- help file can be resized, some of the text will need to be wrapped
- to fit into the window. If a line of text is flush left with
- no preceding white space, the line will be wrapped. All adjacent
- wrappable lines are wrapped as a paragraph. If a line begins with
- a space it will not be wrapped. For example, the following is a
- help topic for a File|Open menu item.
-
- |.topic FileOpen
- | File|Open
- | ---------
- |This menu item will bring up a dialog...
-
- The "File|Open" will not be wrapped with the "----" line since
- they both begin with a space, but the "This menu..." line will
- be wrapped.
- The syntax for a ".topic" line is:
-
- .topic symbol[=number][, symbol[=number][...]]
-
- Note a topic can have multiple symbols that define it so that one
- topic can be used by multiple contexts. The number is optional
- and will be the value of the hcXXX context in the context file
- Once a number is assigned all following topic symbols will be
- assigned numbers in sequence. For example,
-
- .topic FileOpen=3, OpenFile, FFileOpen
-
- will produce the following help context number definitions,
-
- hcFileOpen = 3;
- hcOpenFile = 4;
- hcFFileOpen = 5;
-
- Cross references can be imbedded in the text of a help topic which
- allows the user to quickly access related topics. The format for
- a cross reference is as follows,
-
- {text[:alias]}
-
- The text in the brackets is highlighted by the help viewer. This
- text can be selected by the user and will take the user to the
- topic by the name of the text. Sometimes the text will not be
- the same as a topic symbol. In this case you can use the optional
- alias syntax. The symbol you wish to use is placed after the text
- after a ':'. The following is a paragraph of text using cross
- references,
-
- |The {file open dialog:FileOpen} allows you specify which
- |file you wish to view. If it also allow you to navigate
- |directories. To change to a given directory use the
- |{change directory dialog:ChDir}.
-
- The user can tab or use the mouse to select more information about
- the "file open dialog" or the "change directory dialog". The help
- compiler handles forward references so a topic need not be defined
- before it is referenced. If a topic is referenced but not
- defined, the compiler will give a warning but will still create a
- usable help file. If the undefined reference is used, a message
- ("No help available...") will appear in the help window.
-
- The help file is created by typing the information using any word
- processor and conveniently in the IDE of Turbo Pascal itself.
- The extended ASCII characters such as ▀ and ▄ are entered by holding
- down the Alt key and entering the ASCII values such as 223 and 220
- using the Numeric Keypad to the right of the keyboard, releasing the
- Alt key after each numeric entry.
-
- =======================================================================
-
- Header for program TVHC.PAS -> .EXE
-
- program TVHC;
-
- {$S-}
-
- {$M 8192,8192,655360}
-
- uses Drivers, Objects, Dos, HelpFile;
-
- .
- .
- .
-
- =======================================================================
-
- Syntax for use of the help file compiler TVHC.EXE
- =======================================================================
-
-
- Syntax: TVHC <Help text>[.TXT] [<Help file>[.HLP] [<Symbol file>[.PAS]]
- Help text = Help file source
- Help file = Compiled help file
- Symbol file = A Pascal file containing all the screen names as CONST's
-
-
- e.g. TVHC OOPHELP.TXT OOPHELP.HLP OOPHELP.PAS
-
-
- The [<Symbol file>[.PAS]] is created as a Unit and must then be compiled
- by the normal Turbo Pascal Compiler to produce [<Symbol file>.TPU].
- <Symbol file> must be declared in the USES statement at the start of the
- Turbo Vision program for which the help file has been created.
- Thus for the Turbo Vision program OOPTUTOR.PAS, the Uses statement
- includes OOPHELP, as shown below:
-
- program OOPTutor;
-
- {$X+,S-}
- {$M 16384,8192,655360}
- .
- .
- .
- uses
- Dos, Objects, Drivers, Memory, Views, Menus, Dialogs, StdDlg, MsgBox, App,
- DemoCmds, Gadgets, FViewer, HelpFile, OOPHELP, ColorSel, MouseDlg, Hexa,
- Crt; ========
-
-
- =======================================================================
-
- Extract from the help file OOPHELP.TXT
- =======================================================================
-
-
- .topic NoContext=0
- Turbo Pascal OOP Tutor and Examples ▄
- ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
- Welcome to Turbo Pascal OOP Tutor. This program allows notes on Turbo
- Pascal OOP to be viewed in a scrollable window, whilst the source code
- for a number of examples can also be inspected. These example programs
- can be run as executable files (.EXE) from the tutor screen.
- The ≡ menu is accessed by pressing Alt-Space. All the other menus are
- accessed by pressing Alt-Z, where Z is the first letter of the menu.
- For example, the "Notes" menu is pulled down by Alt-N.
-
- Press ESC to put this help screen away.
-
- .topic Viewer=2
- File viewer ▄
- ▀▀▀▀▀▀▀▀▀▀▀▀
- A file viewer views the contents of a text file. You can use the
- arrow keys to move about in the file. A file is loaded via the
- {File│Open:FOpen} menu item.
- .
- .
- .
- .topic RightOOP
- RightOOP ▄
- ▀▀▀▀▀▀▀▀▀
- This program can be run by selection using the arrow keys and
- pressing ENTER, or else by pressing the highlighted key i.
-
- This is an example of object-oriented programming using virtual
- methods.
- .
- .
- .
-
-
-